package com.justech.mes.v2.dao.repository;

import com.justech.mes.v2.model.MesEquipDetail;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author feifei.li
 */
@Repository
public interface MesEquipDetailRepository extends CrudRepository<MesEquipDetail, Long> {
    /**
     * 根据basicId查询数据
     *
     * @param basicId
     * @return
     */
    public List<MesEquipDetail> findAllByBasicIdOrderByUpdateBy(Long basicId);

    /**
     * 根据Bid查询条数
     *
     * @param basicId
     * @return
     */
    Integer countByBasicId(Long basicId);

    /**
     * 根据Bid删除数据
     *
     * @param basicId
     */
    void deleteByBasicId(Long basicId);
}
